//...arg表示将剩余参数存到arg数组内
function foo(x,...arg){
    console.log(x,arg);
}
foo(1,2,3,4)//1 [ 2, 3, 4 ]